import request from "@/utils/request"

export default {
  queryAccidentById(id){
    return request({
      url:`/accident-record/selectAccidentById/${id}`,
      method: "get",
    })
  },
  //查询所有事故记录，可以按司机名字模糊查询
  queryAccident(nowPage,pageSize,queryCondition) {
    return request({
      url: `/accident-record/conditionSelectMapList/${nowPage}/${pageSize}`,
      method: "post",
      data: queryCondition,
    })
  },
  // 删除
  deleteAccidentByIds(ids){
    return request({
      url:`/accident-record/deleteAccidentByIds/${ids}`,
      method: "post",
      data: ids,
    })
  },
  // 增加
  addAccident(accident){
    return request({
      url:`/accident-record/addOne`,
      method: "post",
      data:accident,
    })
  },
  // 修改
  updateAccident(accident){
    return request({
      url:`/accident-record/edit`,
      method: "post",
      data:accident,
    })
  }

}
